<?php
$db=new PDO("mysql:host=localhost", 'root', '12qwas');
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE,PDO::FETCH_ASSOC);
$db->exec('create database if not exists db5');
$db->exec('use db5');
$db->exec("create table if not exists students (xh varchar(9) not null primary key,name varchar(50), tel varchar (11),pwd varchar (20) default '12345',isAdmin tinyint(1) default 0)");
$r=$db->exec('delete from students');
echo "删除记录个数：{$r}条\n";
$r=$db->exec("insert into students(xh,name,tel) values
             ('213110601','张三','11111111111'),
             ('213110602','李四','22222222222'),
             ('213110603','王五','33333333333'),
             ('213110701','杨柳','44444444444')");
$r=$db->exec("insert into students(xh,name,tel,isAdmin) values('admin','管理员','55599966633',1)");
echo "插入 $r 条记录\n";
$ps=$db->query("select * from students");//返回的结果集包含在$ps语句对象中
foreach ($ps as $row) {
    echo "{$row['xh']}\t{$row['name']}\t{$row['age']}\n";
}
`git config --global user.name "张势莆"`;
`git config --global user.email "2327892062@qq.com"`;